import request from '@/utils/request'

export const addOneWord = data => request({
  url: '/addOneWord',
  method: 'put',
  data: data || {}
})

export const deleteOneWord = id => request({
  url: '/deleteOneWord/' + id,
  method: 'delete'
})

export const updateOneWord = data => request({
  url: '/updateOneWord',
  method: 'patch',
  data: data || {}
})

export const getOneWord = id => request({
  url: '/getOneGoodsWord/' + id,
  method: 'get'
})

export const getWordList = data => request({
  url: '/getWordList',
  method: 'post',
  data: data || {}
})

export const getAllWordList = () => request({
  url: '/getAllWordList',
  method: 'get'
})

// 语音 ---------------------------------------
export const resetAllWordSpeech = () => request({
  url: '/resetAllWordSpeech',
  method: 'get'
})

export const resetWordSpeechWR = id => request({
  url: '/resetWordSpeechWR/' + id,
  method: 'get'
})
